import { http } from '@/util'
import axios from 'axios'  //记得删除

/**
 * 获取主播信息列表
 * @param {string} keyWord 关键字查询 （电话号码等值查询；达人id模糊查询；主播姓名模糊查询）
 * @param {number} pageIndex 当前页 （最小为1） 必须传入
 * @param {string} pageSize 每页大小 （最大为100） 必须传入
 * @param {number} status 状态（0-合作中；1-已禁用）
 * @returns {Promise<any>}
 */
export const getAnchorInfoList = (params) => {
  return http.get('/anchor/platform/manager/activity/anchors/personal/list', {
    params
  })
}

/**
 * 主播个人状态禁用与启用
 * @param {number} accountType 1个人 ，2公司/机构
 * @param {number} applyType 操作类型 ：1启用 ，2禁用
 * @param {number} id 主播id/公司id
 * @returns {Promise<any>}
 */
export const anchorPersonalStatusSwitch = (data) => {
  return http.post('/anchor/platform/manager/activity/anchors/personal/disable/or/enable', data)
}

/**
 * 主播详情信息
 * @param {number} id 主播id
 * @param {number} type 1个人 2公司
 * @returns {Promise<any>}
 */
export const anchorPersonalDesc = (params) => {
  return http.get('/anchor/platform/manager/activity/anchors/personal/detail', {
    params
  })
}

/**
 * 主播合同文件保存和修改
 * @param {number} id 主播id
 * @param {number} role 主播id/公司id
 * @param {Array} urlList 合同图片集合列表
 * @returns {Promise<any>}
 */
export const submitAnchorPersonaContract = (data) => {
  return http.post('/anchor/platform/manager/activity/anchors/personal/contract/addition', data)
}

/**
 * 获取主播审核列表
 * @param {string} keyWord 关键字查询 （电话号码等值查询；达人id模糊查询；主播姓名模糊查询）
 * @param {number} pageIndex 当前页 （最小为1） 必须传入
 * @param {string} pageSize 每页大小 （最大为100） 必须传入
 * @param {number} status 状态（:1-待审核;2-已通过;3-已驳回）
 * @returns {Promise<any>}
 */
export const getAnchorReviewList = (params) => {
  return http.get('/anchor/platform/manager/activity/anchors/audit/list', {
    params
  })
}

/**
 * 获取主播审核列表详情
 * @param {number} applyType 申请人类型 ：1个人 ，2公司
 * @param {number} id id
 * @returns {Promise<any>}
 */
export const getAnchorReviewDesc = (params) => {
  return http.get('/anchor/platform/manager/activity/anchors/audit/detail', {
    params
  })
}

/**
 * 设置主播审核
 * @param {number} applyType 申请人类型 ：1个人 ，2公司
 * @param {number} id id
 * @param {number} status 审核状态 2-通过;3-驳回
 * @returns {Promise<any>}
 */
export const setAnchorReview = (data) => {
  return http.post('/anchor/platform/manager/activity/anchors/audit/do', data)
}

/**
 * 设置抖音上下线状态
 * @param {number} byteVisible 1上线，0不上线
 * @param {number} bizProductId 产品id
 * @returns {Promise<any>}
 */
export const setDyOnLineStatus = (data) => {
  return http.post('/anchor/platform/manager/product/modify/dyProductStatus', data)
}

// 产品列表-产品信息
export const getListOnInfo = function(data) {
  return http.get('/anchor/platform/manager/product/list/on/info', {
    params: data
  })
}

// 产品列表-产品信息-套餐-列表
export const getListOnInfoItem = function(data) {
  return http.get('/anchor/platform/manager/product/list/on/info/item', {
    params: data
  })
}
// 获取详情二维码
export const getShareUrl = function(data) {
  return http.get('/anchor/platform/manager/product/get/share/url/with/id', {
    params: data
  })
}

// 产品推送-管理员
export const authorityAdmin = function(data) {
  return http.post('/product/push/send/notice/authority/admin', data)
}

// 获取商城类型
export const getProductType = function(data) {
  return http.get('/common/productType/getProductType', {
    params: data
  })
}

// 产品上线状态更新
export const releaseUpdate = function(data) {
  return http.post('/design/product/release/update', data)
}

// 提交站点上线
export const releaseManagerUpdate = function(data) {
  return http.post('/design/manager/product/release/update', data)
}

// 查看上次推送图文消息
export const checkNotice = function(data) {
  return http.get('/product/push/check/notice', {
    params: data
  })
}

// 根据userId查询用户所属分公司
export const companyWithUser = function(data) {
  return http.get('/product/user/company/with/user/id', {
    params: data
  })
}

// 产品列表-产品信息-套餐-单个详情-产品中心权限
export const productItemByOne = function(data) {
  return http.get('/product/item/by/one', {
    params: data
  })
}

// 获取站点
export const getLocationAllProvince = function(data) {
  return http.get('/design/location/all/province', {
    params: data
  })
}

// 获取站点和产品
export const getCommonApiSearch = function(data = {}) {
  return http.get(`/common/location/getAllList`, {
    params: data
  })
}

// 合作设置
export const cooperateSet = function(data) {
  return http.post('/anchor/platform/manager/activity/anchors/audit/cooperate/set', data)
}

// 合作设置详情
export const cooperateDetail = function(data = {}) {
  return http.get(`/anchor/platform/manager/activity/anchors/audit/cooperate/set/detail`, {
    params: data
  })
}

// 合作记录
export const cooperateInfoList = function(data = {}) {
  return http.get(`/anchor/platform/manager/activity/anchors/audit/cooperate/list`, {
    params: data
  })
}

// 提现列表
export const settlementCashList = function(data = {}) {
  return http.get(`/anchor/platform/manager/activity/anchors/settlement/cash/list`, {
    params: data
  })
}

// 子账号
export const childAnchorsList = function(data = {}) {
  return http.get(`/anchor/platform/manager/activity/anchors/personal/company/sub/slist`, {
    params: data
  })
}

// 平台列表查询
export const platformList = function(data = {}) {
  return http.get(`/anchor/platform/manager/platform/qry/platformList`, {
    params: data
  })
}

// 新增平台
export const insertPlatform = function(data) {
  return http.post('/anchor/platform/manager/platform/insert/platform', data)
}

// 编辑详情
export const updateAnchorsInfo = function(data) {
  return http.post('/anchor/platform/manager/activity/anchors/personal/basis/update', data)
}

// 打款详情--LIST
export const accountDetail = function(data = {}) {
  return http.get(`/anchor/platform/manager/activity/anchors/remit/account/detail`, {
    params: data
  })
}

// 打款申请
export const anchorsApply = function(data) {
  return http.post('/anchor/platform/manager/activity/anchors/remit/apply', data)
}

// 打款草稿
export const cashDraftDetail = function(data = {}) {
  return http.get(`/anchor/platform/manager/activity/anchors/remit/cash/draft/detail`, {
    params: data
  })
}

// 订单管理
export const orderList = function(data = {}) {
  return http.get(`/anchor/platform/manager/order/list`, {
    params: data
  })
}

// 数据统计
export const statistData = function(data) {
  return http.post('/bi/anchor/platform/dy/order/statistics/query', data)
}

// 站点列表bi
export const locationListBi = function(data) {
  return http.post('/bi/anchor/platform/anchors/common/location/list', data)
}

// 站点列表
export const locationList = function(data) {
  return http.post('/anchor/platform/anchors/common/location/list', data)
}

// 导出统计列表
export function exportStatistList(data) {
  return http.post('/bi/anchor/platform/dy/order/statistics/export', data, {
    responseType: 'arraybuffer'
  })
}

// poi数据统计
export const pioProductData = function(data) {
  return http.post('/anchor/platform/dy/product/statistics/query', data)
}

// poi导出统计列表
export function exportPoiList(data) {
  return http.post('/anchor/platform/dy/product/statistics/export', data, {
    responseType: 'arraybuffer'
  })
}

// 主播维度
export const anchorData = function(data) {
  return http.post('/bi/anchor/platform/anchor/statistics/detail/page', data)
}
// 主播维度-pie
export const anchorPieData = function(data) {
  return http.post('/bi/anchor/platform/anchor/statistics/total/query', data)
}

// 订单实时监控
export const orderTimeMonitoring = function(data = {}) {
  return http.get(`/anchor/platform/manager/order/realTimeMonitoring`, {
    params: data
  })
}
// 销售主播绑定
export const agentSellerBindList = function(data = {}) {
  return http.get(`/anchor/platform/manager/agentSellerBind/list`, {
    params: data
  })
}

// 根据号码检索主播信息
export const agentSellerSearch = function(data = {}) {
  return http.get(`/anchor/platform/manager/agentSellerBind/retrievalAgentByTel`, {
    params: data
  })
}

// 根据号码检索主播信息
export const agentVideoList = function(data = {}) {
  return http.get(`/anchor/platform/manager/agentVideo/list`, {
    params: data
  })
}

// 站点列表-区总
export const pointLocationList = function(data) {
  return http.post('/anchor/platform/anchors/common/location/self/list', data)
}
// 站点列表-区总-BI
export const biPointLocationList = function(data) {
  return http.post('/bi/anchor/platform/anchors/common/location/self/list', data)
}
// 获取其他资质类型
export const getPoiZZType = function() {
  return http.get(`/anchor/platform/manager/poi/qualification/list`)
}
// 获取当前资质详情
export const getPoiNowZZDetail = function(data = {}) {
  return http.get('/anchor/platform/manager/poi/product/detail', {
    params: data
  })
}
// poi上传或修改资质
export const addOrUpdateZZ = function(data) {
  return http.post('/anchor/platform/manager/poi/qualification/addOrUpdate', data)
}
// poi数据统计-分总、区总
export const pointPioProductData = function(data) {
  return http.post('/anchor/platform/dy/product/statistics/query/self', data)
}
// 提交商家资质审核
export const syncMerchantQualificationReview = function(data) {
  return http.post('/anchor/platform/manager/poi/qualification/', data)
}
// POI拒绝审核
export const rejectAudit = function(data) {
  return http.post('/anchor/platform/manager/poi/qualification/refused', data)
}

// 新增销售主播绑定关系
export const bindAgentData = function(data) {
  return http.post('/anchor/platform/manager/agentSellerBind/bindAgentAndSeller', data)
}

// 新增视频绑定关系
export const bindVideoData = function(data) {
  return http.post('/anchor/platform/manager/agentVideo/insertVideo', data)
}

// 产品列表-产品信息-分总
export const pointGetListOnInfo = function(data) {
  return http.get('/anchor/platform/manager/product/list/on/info/self', {
    params: data
  })
}

// poi列表查询 poi维度
export const poiListUrl = function(data) {
  return http.get('/anchor/platform/manager/poi/list', {
    params: data
  })
}

// poi列表查询 产品维度
export const poiProductListUrl = function(data) {
  return http.get('/anchor/platform/manager/poi/product/list', {
    params: data
  })
}

// poi同步状态刷新
export const poiRefreshUrl = function(data) {
  return http.get('/anchor/platform/manager/poi/refresh', {
    params: data
  })
}

// 高德id修改
export const ResetGdIdUrl = function(data) {
  return http.post('/anchor/platform/manager/poi/update/gdid', data)
}

// poi同步状态重置
export const poiResetUrl = function(data) {
  return http.post('/anchor/platform/manager/poi/reset', data)
}

// SPU列表
export const spuListUrl = function(data) {
  return http.get('/anchor/platform/manager/poi/spu/list', {
    params: data
  })
}
spuLItemUrl({id:item.id})
// SPU列表项
export const spuLItemUrl = function(data) {
  let {status,itemId} = data
  return axios('http://10.14.2.149:8081/anchor/platform/manager/poi/spu/productVersionInfo', {
    params: {
      status:status||'',
      // itemId:itemId||1302553,
      itemId:1302553,
    }
  })
}


// SPU列表分、区总
export const spuListUrlElse = function(data) {
  return http.get('/anchor/platform/manager/poi/spu/list/self', {
    params: data
  })
}

// SPU新增绑定POI-->负责人:张勇
export const spuBindAddUrl = function(data) {
  return http.post('/anchor/platform/manager/poi/spu/binding/add', data)
}

// 批量删除
export const bindingDelete = function(data) {
  return http.post('/anchor/platform/manager/poi/spu/binding/delete', data)
}

// SPU解除/恢复POI type=1 解除 ，type=2 恢复 -->负责人:张勇
export const spuBindUpdateUrl = function(data) {
  return http.get(`/anchor/platform/manager/poi/spu/binding/update`, {
    params: data
  })
}

// SPU刷新-->负责人:张勇
export const poiSpuRefreshUrl = function(data) {
  return http.get(`/anchor/platform/manager/poi/spu/refresh`, {
    params: data
  })
}

// SPU同步 -->负责人:张勇
export const poiSpuSyncUrl = function(data) {
  return http.get(`/anchor/platform/manager/poi/spu/sync`, {
    params: data
  })
}
// spu产品下架信息
export const offGoodsMessage = function(data) {
  return http.get('/anchor/platform/manager/poi/spu/theShelves/message', {
    params: data
  })
}
// spu产品下架
export const offGoods = function(data) {
  return http.post('/anchor/platform/manager/product/modify/dyProductStatus', data)
}
// POI匹配申请数据导出
export function exportPoiInfo(data) {
  return http.post('/anchor/platform/manager/poiData/export/poiInfo', data, {
    responseType: 'arraybuffer'
  })
}

// POI匹配申请数据导出
export function exportHost(data) {
  return http.post('/bi/anchor/platform/anchor/statistics/detail/export', data, {
    responseType: 'arraybuffer'
  })
}

// 主播合作模式审核信息列表
export const auditApplyList = function(data) {
  return http.get(`/anchor/platform/manager/activity/anchors/audit/apply/list`, {
    params: data
  })
}

// 渠道人员
export const getAllUserList = function(data) {
  return http.get(`/common/positionUserSearch/getAllUser`, {
    params: data
  })
}

// 数据实时监控-商品维度
export const statisticsGoods = function(data) {
  return http.post('/bi/anchor/platform/dy/order/statistics/location/query', data)
}

// 数据实时监控-商品维度-套餐
export const statisticsGoodsItems = function(data) {
  return http.post('/bi/anchor/platform/dy/order/statistics/location/items/query', data)
}

// POI匹配申请数据导出
export function exportGoods(data) {
  return http.post('/bi/anchor/platform/dy/order/statistics/location/export', data, {
    responseType: 'arraybuffer'
  })
}

// 数据实时监控-商品维度-查询(区总、分总) 抖音1.4
export const statisticsGoodsPointAndArea = function(data) {
  return http.post('/bi/anchor/platform/dy/order/statistics/location/query/self', data)
}

// 申请列表
export const agentShopList = function(data) {
  return http.get(`/anchor/platform/manager/agent/shop/list`, {
    params: data
  })
}

// 发起申请
export const agentShopApply = function(data) {
  return http.post('/anchor/platform/manager/agent/shop/apply', data)
}

// 申请详细信息
export const agentShopDetail = function(data) {
  return http.get(`/anchor/platform/manager/agent/shop/detail`, {
    params: data
  })
}

// 商品管理-产品经理列表 /design/douyin/product/list/authority/pm
export const getDouyiPmList = (params) =>
  http.get(`/design/douyin/product/list/authority/pm`, {
    params
  })

// 复制产品-产品经理 /design/douyin/product/copy
export const getDouyiPmCopy = (data) => http.post(`/design/douyin/product/copy`, data)
// 站点维度 列表
export const siteStatisticsDetail = function(data) {
  return http.post('/bi/anchor/platform/anchor/site/statistics/detail/page', data)
}
// 站点维度 列表(分、区总)
export const siteStatisticsDetailSelf = function(data) {
  return http.post('/bi/anchor/platform/anchor/site/statistics/detail/page/self', data)
}
// 站点维度 图形
export const siteStatisticsTotal = function(data) {
  return http.post('/bi/anchor/platform/anchor/site/statistics/total/query', data)
}
// 站点维度 图形（分、区总）
export const siteStatisticsTotalSelf = function(data) {
  return http.post('/bi/anchor/platform/anchor/site/statistics/total/query/self', data)
}
// 视频维度 列表
export const videoStatisticsDetail = function(data) {
  return http.post('/bi/anchor/platform/anchor/video/statistics/detail/page', data)
}
// 视频维度 列表(分、区总)
export const videoStatisticsDetailSelf = function(data) {
  return http.post('/bi/anchor/platform/anchor/video/statistics/detail/page/self', data)
}
// 视频维度 图形
export const videoStatisticsTotal = function(data) {
  return http.post('/bi/anchor/platform/anchor/video/statistics/total/query', data)
}

// 查询产品站点
export function getProviceLocation(params) {
  return http.get('/design/douyin/product/locations/province', {
    params
  })
}

// 抖音产品上线 /design/douyin/product/release/update
export const updateDouyiPmRelease = (data) => http.post(`/design/douyin/product/release/update`, data)

// 商品管理-区总审核
export const getDouyiRegionList = (params) =>
  http.get(`/design/douyin/product/audit/list/authority/region`, {
    params
  })

// 商品管理-区总管理 /design/douyin/product/list/authority/region
export const getDouyiRegionAdminList = (params) =>
  http.get(`/design/douyin/product/list/authority/region`, {
    params
  })

// 商品管理-分总管理 /design/douyin/product/list/authority/subtotal
export const getDouyiSubtotalAdminList = (params) =>
  http.get(`/design/douyin/product/list/authority/subtotal`, {
    params
  })

// 商品管理-分总审核 /design/douyin/product/list/authority/subtotal
export const getDouyiSubtotalList = (params) =>
  http.get(`/design/douyin/product/audit/list/authority/subtotal`, {
    params
  })

// 抖音产品下线站点 /design/douyin/product/release/offline
export const updateDouyiofflineRelease = (data) => http.post(`/design/douyin/product/release/offline`, data)

// 抖音产品审核 /design/douyin/product/audit
export const auditDouyinproduct = (data) => http.post(`/design/douyin/product/audit`, data)
// 视频维度 图形（分、区总）
export const videoStatisticsTotalSelf = function(data) {
  return http.post('/bi/anchor/platform/anchor/video/statistics/total/query/self', data)
}

// 直播产品列表查询
export const getLiveProductList = (params) =>
  http.get('/anchor/platform/manager/product/live/page', {
    params
  })
// 直播产品新增
export const addLiveProduct = (params) =>
  http.get('/anchor/platform/manager/product/live/add', {
    params
  })
// 直播产品修改
export const fixLiveProduct = (params) =>
  http.get('/anchor/platform/manager/product/live/update', {
    params
  })
// 直播产品修改
export const fixLiveProductMoney = (params) =>
  http.get('/anchor/platform/manager/product/live/agent/money/update', {
    params
  })
// 直播产品置顶
export const topLiveProduct = (params) =>
  http.get('/anchor/platform/manager/product/live/product/top', {
    params
  })

// 黑名单列表
export const getBlacklist = (params) =>
  http.get('/anchor/platform/manager/agent/black/list', {
    params
  })
// 添加黑名单
export const addBlacklist = function(data) {
  return http.post('/anchor/platform/manager/agent/black/saveOrUpdate', data)
}
// 拉黑解除黑名单
export const pullBlackReleaseBlacklist = (params) =>
  http.get('/anchor/platform/manager/agent/black/update', {
    params
  })
// 黑名单列表分区总
export const getBlacklistElse = (params) =>
  http.get('/anchor/platform/manager/agent/black/list/location', {
    params
  })

export const getAllStation = (params) =>
  http.get('/common/location/getSingleList', {
    params
  })

/**
 *
 * 新上单
 *
 * */

// 产品信息（BD）
export const getProductPmList = (params) =>
  http.get('/product/v3/list/on/pm', {
    params
  })

// 产品信息（分总）
export const getProductsubtotalList = (params) =>
  http.get('/product/v3/list/on/subtotal', {
    params
  })

// 产品信息（区总）
export const getProductregionList = (params) =>
  http.get('/product/v3/list/on/region', {
    params
  })

// 产品信息（集团）
export const getProductGroupList = (params) =>
  http.get('/product/v3/list/on/group', {
    params
  })

// 产品信息（超管）
export const getProductAdminList = (params) =>
  http.get('/product/v3/list/on/manager', {
    params
  })
// 查看详情
export const getProductInfo = (params) =>
  http.get('/product/v3/info/detail', {
    params
  })

// 搜索文案
export const getProductWriter = (params) =>
  http.get('/product/v3/writer', {
    params
  })
// 派单
export const setProductWriter = (params) => http.post('/product/v3/bind/writer', params)

// 查询销售详情
export const getProductSaleList = (params) =>
  http.get('/product/v3/sale/info', {
    params
  })
// 选择产品合同-产品经理权限
export const getProductContractPmList = (params) =>
  http.get('/product/v3/contract/list/of/pm', {
    params
  })
// 获取设计师列表
export const getProductAssignList = (params) =>
  http.get('/design/paperwork/v3/designer/list', {
    params
  })
// 产品信息-设计（管理）
export const getProductAssignManagerList = (params) =>
  http.get('/product/v3/list/with/designManager', {
    params
  })
// 转单 /design/paperwork/v3/turn/single
export const setProductAssignPaperwork = (params) =>
  http.get('/design/paperwork/v3/turn/single', {
    params
  })

// 指派设计师
export const setProductAssignDesigner = (params) =>
  http.get('/design/paperwork/v3/assign/designer', {
    params
  })

// 指派设计师-管理
export const setProductAssignDesignerAdmin = (params) =>
  http.get('/design/paperwork/manager/v3/assign/designer', {
    params
  })

// 确认文案
export const setProductAssignConfirm = (params) =>
  http.get('/design/paperwork/v3/confirm', {
    params
  })

// 确认文案 - 管理
export const setProductAssignConfirmAdmin = (params) =>
  http.get('/design/paperwork/manager/v3/confirm', {
    params
  })
//  文案列表接口
export const getProductWriterList = (params) =>
  http.get('/product/v3/list/with/writer', {
    params
  })

// 文案组长列表接口
export const getProductWriterLeaderList = (params) =>
  http.get('/product/v3/list/with/writer/group/leader', {
    params
  })
// 产品信息-文案列表（管理）
export const getProductWriterManagerList = (params) =>
  http.get('/product/v3/list/with/writerManager', {
    params
  })
// 获取文案列表
export const getProductDesignerList = (params) =>
  http.get('/product/v3/list/with/designer', {
    params
  })

// 标记设计是否完成
export const setProductDesignerComplete = (params) => http.post('/design/paperwork/v3/complete', params)

// 产品上线确认列表-管理
export const getAdminProductConfirmList = (params) =>
  http.get('/product/v3/wait/confirm/list', {
    params
  })

// 产品上线确认列表 - 产品经理

export const getPmProductConfirmList = (params) =>
  http.get('/product/v3/wait/confirm/list/pm', {
    params
  })

// 确认产品
export const setProductConfirm = (params) => http.post('/product/v3/confirm', params)

// 产品上架信息
export const getPmProductOnlineInfo = (params) =>
  http.get('/design/paperwork/v3/product/online/info', {
    params
  })

// 上架管理产品列表-普通
export const getPmProductReleaseList = (params) =>
  http.get('/product/v3/wait/release/list/with/writer', {
    params
  })

// 上架管理产品列表-管理
export const getManagerProductReleaseList = (params) =>
  http.get('/product/v3/wait/release/list/with/manager', {
    params
  })

// 上架
export const setPmProductReleaseOnline = (params) => http.post('/design/paperwork/v3/product/online', params)

// 上架-管理
export const setAdminProductReleaseOnline = (params) => http.post('/design/paperwork/manager/v3/product/online', params)

// 下架
export const setPmProductReleaseOffSale = (params) => http.post('/design/paperwork/v3/product/offline', params)

// 所有站点
export const getAllLocattion = (params) =>
  http.get('/common/location/getAllList', {
    params
  })

// 下架 /design/paperwork/manager/v3/product/offline
export const setPmProductReleaseManagerOffSale = (params) => http.post('/design/paperwork/manager/v3/product/offline', params)

// 查询合同列表-分总权限
export const getProductContractSubtotalList = (params) =>
  http.get('/product/v3/contract/list/of/subtotal', {
    params
  })

// 查询合同列表-区总权限
export const getProductContractDivisionList = (params) =>
  http.get('/product/v3/contract/list/of/division', {
    params
  })

// 查询合同列表-管理员权限
export const getProductContractList = (params) =>
  http.get('/product/v3/contract/list', {
    params
  })

// 设计详情
export const getDesignProductInfo = (params) =>
  http.get('/design/paperwork/v3/design/product/info', {
    params
  })

// 查询产品编辑待完成项
export const getFieldNotComplete = (params) =>
  http.get('/product/v3/field/not/complete', {
    params
  })
// 下载导入黑名单模版
export const downloadTemplate = (params) =>
  http.get('/anchor/platform/manager/agent/black/batch/template', {
    params
  })
// 导入黑名单
export const uploadBlackList = function(data) {
  return http.post('/anchor/platform/manager/agent/black/batch/operate', data, { responseType: 'arraybuffer' })
}

// 直播商品数据删除
export const liveProudctDel = (params) =>
  http.get('/anchor/platform/manager/product/live/logical/delete', {
    params
  })

// 直播商品数据上下架
export const liveProudctDownUp = (params) =>
  http.get('/anchor/platform/manager/product/live/visible/set', {
    params
  })

// 直播商品数据统计 admin
export const liveProudctTotal = (params) =>
  http.get('/anchor/platform/manager/product/live/product/st/total', {
    params
  })

// 直播商品数据统计 point
export const liveProudctTotalPoint = (params) =>
  http.get('/anchor/platform/manager/product/live/product/st/total/self', {
    params
  })

// 直播产品统计明细-admin
export const liveProudctSt = (params) =>
  http.get('/anchor/platform/manager/product/live/product/st/detail', {
    params
  })

// 直播产品统计明细-Point
export const liveProudctStPoint = (params) =>
  http.get('/anchor/platform/manager/product/live/product/st/detail/self', {
    params
  })

// 直播站点列表添加-->负责人:叶道平
export const livelocationAdd = (params) =>
  http.get('/anchor/platform/manager/live/location/add', {
    params
  })

// 直播站点逻辑删除-->负责人:叶道平
export const livelocationDelete = (params) =>
  http.get('/anchor/platform/manager/live/location/logical/delete', {
    params
  })

// 直播站点列表查询-->负责人:叶道平
export const livelocationList = (params) =>
  http.get('/anchor/platform/manager/live/location/page', {
    params
  })

// 直播站点列表修改-->负责人:叶道平
export const livelocationUpdate = (params) =>
  http.get('/anchor/platform/manager/live/location/update', {
    params
  })
// 直播站点上下架-->负责人:叶道平
export const livelocationVisible = (params) =>
  http.get('/anchor/platform/manager/live/location/visible/set', {
    params
  })
// 获取h5链接
export const getH5url = (params) =>
  http.get('anchor/platform/manager/poi/spu/shortUrl', {
    params
  })

// poi新增商家授权书
export const hotelAddOrUpdate = function(data) {
  return http.post('/anchor/platform/manager/poi/add/potocolauth', data)
}
export const getPotocolauth = (params) =>
  http.get('/anchor/platform/manager/poi/get/potocolauth', {
    params
  })

// // h5
// export const getH5List = (params) =>
//   http.get('/anchor/platform/manager/poi/qualification/info', {
//     params
//   })
// export const getH5Detail = (params) =>
//   http.get('/anchor/platform/manager/poi/product/detail', {
//     params
//   })
// export const getH5Type = (params) =>
//   http.get('/anchor/platform/manager/poi/qualification/list', {
//     params
//   })
// export const upDateH5 = function(data) {
//   return http.post('/anchor/platform/manager/poi/qualification/addOrUpdate', data)
// }
export const poiRefreshDyPoi = (params) =>
  http.get('/anchor/platform/manager/poi/refresh/dyPoi', {
    params
  })

export const poiRefreshGdPoi = (params) =>
  http.get('/anchor/platform/manager/poi/refresh/gdPoi', {
    params
  })

// 获取最新时间
export const lastDay = function(data) {
  return http.get('/human/newProduct/lastDay', { params: data })
}
// 商家汇总1
export const getReleaseAdmin = function(data) {
  return http.get('/human/newProduct/getRelease/admin', { params: data })
}
export const getReleaseArea = function(data) {
  return http.get('/human/newProduct/getRelease/area', { params: data })
}
export const getReleaseBd = function(data) {
  return http.get('/human/newProduct/getRelease/bd', { params: data })
}
export const getReleaseSub = function(data) {
  return http.get('/human/newProduct/getRelease/sub', { params: data })
}
// 商家汇总指标2
export const getReleaseVerticalAdmin = function(data) {
  return http.get('/human/newProduct/getReleaseVertical/admin', { params: data })
}
export const getReleaseVerticalArea = function(data) {
  return http.get('/human/newProduct/getReleaseVertical/area', { params: data })
}
export const getReleaseVerticalBd = function(data) {
  return http.get('/human/newProduct/getReleaseVertical/bd', { params: data })
}
export const getReleaseVerticalSub = function(data) {
  return http.get('/human/newProduct/getReleaseVertical/sub', { params: data })
}
// 商家流水排行3
export const getReleaseDetailRankAdmin = function(data) {
  return http.get('/human/newProduct/getReleaseDetailRank/admin', { params: data })
}
export const getReleaseDetailRankArea = function(data) {
  return http.get('/human/newProduct/getReleaseDetailRank/area', { params: data })
}
export const getReleaseDetailRankBd = function(data) {
  return http.get('/human/newProduct/getReleaseDetailRank/bd', { params: data })
}
export const getReleaseDetailRankSub = function(data) {
  return http.get('/human/newProduct/getReleaseDetailRank/sub', { params: data })
}
// 商品流水排行4
export const getProductDetailRankAdmin = function(data) {
  return http.get('/human/newProduct/getProductDetailRank/admin', { params: data })
}
export const getProductDetailRankArea = function(data) {
  return http.get('/human/newProduct/getProductDetailRank/area', { params: data })
}
export const getProductDetailRankBd = function(data) {
  return http.get('/human/newProduct/getProductDetailRank/bd', { params: data })
}
export const getProductDetailRankSub = function(data) {
  return http.get('/human/newProduct/getProductDetailRank/sub', { params: data })
}
// 获取商家列表
export const getReleaseDetailAdmin = function(data) {
  return http.get('/human/newProduct/getReleaseDetail/Admin', { params: data })
}
export const getReleaseDetailArea = function(data) {
  return http.get('/human/newProduct/getReleaseDetail/area', { params: data })
}
export const getReleaseDetailBd = function(data) {
  return http.get('/human/newProduct/getReleaseDetail/bd', { params: data })
}
export const getReleaseDetailSub = function(data) {
  return http.get('/human/newProduct/getReleaseDetail/sub', { params: data })
}
// 获取行业列表
export const getAllBusinessCategory = function(data) {
  return http.get('/human/newProduct/getAllBusinessCategory', { params: data })
}
// 获取产品列表
export const getProductDetail = function(data) {
  return http.get('/human/newProduct/getProductDetail', { params: data })
}
// 获取站点列表
export const getProductDetailSale = function(data) {
  return http.get('/human/newProduct/getProductDetailSale', { params: data })
}
// 获取产品类别
export const getAllProductCategory = function(data) {
  return http.get('/human/newProduct/getAllProductCategory', { params: data })
}

// 站点维度 图形
export const cpsAllUpdateUrl = function(data) {
  return http.post('/anchor/platform/manager/poi/spu/cps/config', data)
}

// 初始化增加库存申请
export const applicationInit = (params) =>
  http.get('/product/v3/increase/stock/application/init', {
    params
  })

// 提交增加库存申请
export const submitApplicationStock = function(data) {
  return http.post('/product/v3/increase/stock/application/submit', data)
}

export const applicationDanceMoneyInit = (params) =>
  http.get('/product/v3/apply/byteDanceMoney/application/init', {
    params
  })
//
export const submitApplicationStockDanceMoney = function(data) {
  return http.post('/product/v3/apply/byteDanceMoney/application/submit', data)
}

// 新的站点
export const getAllStationNew = (params) =>
  http.get('/common/location/list', {
    params
  })
// 获取用户信息
export const getUserInfoUrl = (params) =>
  http.get('/common/login/getUserInfo', {
    params
  })

// 产品信息-达运-分公司
export const getOnBranchList = (params) =>
  http.get('/product/v3/list/on/branch', {
    params
  })

// 产品信息-达运-集团
export const getOnDaYunGroupList = (params) =>
  http.get('/product/v3/list/on/dayun/group', {
    params
  })

// 查询购买须知
export const getBuyNotice = (productId) =>
  http.get('/product/v3/buyNotice/by/productId', {
    params: {
      productId
    }
  })

// 达运 - 修改购买须知
export const updateDaYunBuyNotice = function(data) {
  return http.post('/product/v3/update/buyNotice', data)
}

// 达运-查询修改套餐设置
export const getNewMediaChannelPrice = (productId) =>
  http.get('/product/v3/items/newMediaChannelPrice', {
    params: {
      productId
    }
  })
// 达运-获取产品抖音文案规则信息
export const getRulesBytedance = (params) =>
  http.get('/product/v3/copyWriting/rules/of/bytedance', {
    params
  })

// 达运-保存产品抖音文案规则信息
export const saveRulesBytedance = function(data) {
  return http.post('/product/v3/copyWriting/rules/of/bytedance/save', data)
}

// 达运-保存产品抖音文案规则信息-集团权限
export const saveManagerRulesBytedance = function(data) {
  return http.post('/product/v3/manager/copyWriting/rules/of/bytedance/save', data)
}

// 达运-保存套餐新媒体渠道价格信息接口：
export const saveNewMediaChannelPrice = function(data) {
  return http.post('/product/v3/items/newMediaChannelPrice/save', data)
}
// 达运-查询修改套餐明细
export const getItemDetails = (params) =>
  http.get('/product/v3/list/on/quety/itemDetails', {
    params: params
  })
// 达运-提交修改套餐明细
export const updateItemDetails = (data) => {
  return http.post('/product/v3/list/on/update/itemDetails', data)
}

// 修改产品购买须知-集团权限：
export const updateDaYunBuyNoticeManager = function(data) {
  return http.post('/product/v3/manager/update/buyNotice', data)
}
// 保存套餐新媒体渠道价格信息-集团权限：
export const saveNewMediaChannelPriceManager = function(data) {
  return http.post('/product/v3/manager/items/newMediaChannelPrice/save', data)
}
// 上传图片
export const uploadfile = (file) => {
  return http.post('/product/file/upload/path', file)
}
// 达运-获取图片列表
export const bannerlist = (params) => {
  return http.get('/product/v3/banner/list', {
    params: params
  })
}
// 达运-提交修改图片
export const bannerupdate = (data) => {
  return http.post('/product/v3/banner/update', data)
}
// 获取随心退 产品列表 分总
export const subManagerlist = (params) => {
  return http.get('/market/product/refund/subManager/list', {
    params: params
  })
}
// 获取随心退 产品列表 管理员
export const adminlist = (params) => {
  return http.get('/market/product/refund/admin/list', {
    params: params
  })
}
// 关闭随心退
export const updateWillRefund = (data) => {
  return http.post('/market/product/refund/updateWillRefund', data)
}
